#遍历系统环境变量PATH所包含的各个目录路径，统计每个目录下文件的数量
#!/bin/bash
mypath=$(echo $PATH | sed 's/:/ /g')
count=0
for dir in $mypath
do
  if [ -e $dir ] 
  then
  check=$(ls $dir)
  for file in $check
  do 
    let count++
  done
  fi
  echo "$dir--$count "
  count=0
done
